home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntlib43 / mntlib / mknod.c < prev    next >
C/C++ Source or Header  |  1993-10-11  |  318b  |  21 lines

  1. /* fake mknod -- this always fails */
  2.  
  3. #include <errno.h>
  4. #include <support.h>
  5. #include <stat.h>
  6.  
  7. int
  8. mknod(path, mode, dev)
  9.     char *path;
  10.     int mode, dev;
  11. {
  12.     if (S_ISDIR(mode)) {
  13.         return (mkdir(path, (mode_t) mode));
  14.     }
  15.     if (S_ISFIFO(mode)) {
  16.         return (mkfifo(path, (mode_t) mode));
  17.     }    
  18.     errno = EINVAL;
  19.     return -1;
  20. }
  21.